home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 December
/
PCWorld_2007-12_cd.bin
/
domacnost a kancelar
/
autoit
/
autoit-v3-setup.exe
/
Examples
/
Helpfile
/
Exit.au3
< prev
next >
Wrap
Text File
|
2007-09-08
|
503b
|
22 lines
;First Example
Exit
;Second Example
; Terminate script if no command-line arguments
If $CmdLine[0] = 0 Then Exit(1)
;Third Example
; Open file specified as first command-line argument
$file = FileOpen($CmdLine[1], 0)
; Check if file opened for reading OK
If $file = -1 Then Exit(2)
; If file is empty then exit (script is successful)
$line = FileReadLine($file)
If @error = -1 Then Exit
;code to process file goes here
FileClose($file)
Exit ;is optional if last line of script